<html lang="zh-cn">
<head>
<style type="text/css" title="audiojs">
.audiojs audio { position: absolute; left: -1px; }
.audiojs { position: relative;top:-10px; padding:0px 89px 0px 38px; height: 36px; background: #404040; overflow: hidden; font-family: monospace; font-size: 12px;           background-image: -webkit-gradient(linear, left top, left bottom, color-stop(0, #444), color-stop(0.5, #555), color-stop(0.51, #444), color-stop(1, #444));           background-image: -moz-linear-gradient(center top, #444 0%, #555 50%, #444 51%, #444 100%);           -webkit-box-shadow: 1px 1px 8px rgba(0, 0, 0, 0.3); -moz-box-shadow: 1px 1px 8px rgba(0, 0, 0, 0.3);           -o-box-shadow: 1px 1px 8px rgba(0, 0, 0, 0.3); box-shadow: 1px 1px 8px rgba(0, 0, 0, 0.3); }
.audiojs .play-pause { width: 25px; height: 28px; padding: 4px 6px; margin-left:-38px; float: left; overflow: hidden; border-right: 1px solid #000; }
.audiojs p { display: none; width: 25px; height: 28px; margin: 0px !important; cursor: pointer; }
.audiojs .play { display: block; }
.audiojs .scrubber { position: relative; background: #5a5a5a; height: 14px; margin: 10px; border-top: 1px solid #3f3f3f; border-left: 0px; border-bottom: 0px; overflow: hidden; }
.audiojs .progress { position: absolute; top: 0px; left: 0px; height: 14px; width: 0px; background: #ccc; z-index: 1;           background-image: -webkit-gradient(linear, left top, left bottom, color-stop(0, #ccc), color-stop(0.5, #ddd), color-stop(0.51, #ccc), color-stop(1, #ccc));           background-image: -moz-linear-gradient(center top, #ccc 0%, #ddd 50%, #ccc 51%, #ccc 100%); }
.audiojs .loaded { position: absolute; top: 0px; left: 0px; height: 14px; width: 0px; background: #000;           background-image: -webkit-gradient(linear, left top, left bottom, color-stop(0, #222), color-stop(0.5, #333), color-stop(0.51, #222), color-stop(1, #222));           background-image: -moz-linear-gradient(center top, #222 0%, #333 50%, #222 51%, #222 100%); }
.audiojs .time { position: absolute; right:0px; top:0px; height: 36px; line-height: 36px; margin: 0px 0px 0px 0px; padding: 0px 6px 0px 12px; border-left: 1px solid #000; color: #ddd; text-shadow: 1px 1px 0px rgba(0, 0, 0, 0.5); }         .audiojs .time em { padding: 0px 2px 0px 0px; color: #f9f9f9; font-style: normal; }         .audiojs .time strong { padding: 0px 0px 0px 2px; font-weight: normal; }         .audiojs .error-message { float: left; display: none; margin: 0px 10px; height: 36px; width: 400px; overflow: hidden; line-height: 36px; white-space: nowrap; color: #fff;           text-overflow: ellipsis; -o-text-overflow: ellipsis; -icab-text-overflow: ellipsis; -khtml-text-overflow: ellipsis; -moz-text-overflow: ellipsis; -webkit-text-overflow: ellipsis; }         .audiojs .error-message a { color: #eee; text-decoration: none; padding-bottom: 1px; border-bottom: 1px solid #999; white-space: wrap; }                 .audiojs .play { background: url("/addons/hx_dialect/template/mobile/images/player-graphics.gif") -2px -1px no-repeat; }         .audiojs .loading { background: url("/addons/hx_dialect/template/mobile/images/player-graphics.gif") -2px -31px no-repeat; }         .audiojs .error { background: url("/addons/hx_dialect/template/mobile/images/player-graphics.gif") -2px -61px no-repeat; }         .audiojs .pause { background: url("/addons/hx_dialect/template/mobile/images/player-graphics.gif") -2px -91px no-repeat; }                 .playing .play, .playing .loading, .playing .error { display: none; }         .playing .pause { display: block; }                 .loading .play, .loading .pause, .loading .error { display: none; }         .loading .loading { display: block; }                 .error .time, .error .play, .error .pause, .error .scrubber, .error .loading { display: none; }         .error .error { display: block; }         .error .play-pause p { cursor: auto; }         .error .error-message { display: block; }</style><meta content="text/html;charset=gbk" http-equiv="content-type"><!-- /Added by HTTrack -->

    <meta content="text/html; charset=utf-8" http-equiv="Content-Type">

    <meta content="width=device-width, initial-scale=1.0, user-scalable=0, minimum-scale=1.0, maximum-scale=1.0" name="viewport">
    <meta content="yes" name="apple-mobile-web-app-capable">
    <meta content="black" name="apple-mobile-web-app-status-bar-style">
    <title>{$reply['r_title']}</title>
    <meta content="" name="keywords">
    <meta content="{$reply['r_name']}听力测试" name="description">
    <script src="http://libs.baidu.com/jquery/2.0.0/jquery.min.js"></script><!-- 
    <script type="text/javascript" src="/addons/hx_dialect/template/mobile/images/validform_min.js"></script> -->
    <link href="/addons/hx_dialect/template/mobile/images/validform_wap.css" rel="stylesheet" type="text/css">
    <link href="/addons/hx_dialect/template/mobile/images/form.css" rel="stylesheet" type="text/css">
    <link href="/addons/hx_dialect/template/mobile/images/btn.css" rel="stylesheet" type="text/css">
    <link rel="stylesheet" type="text/css" href="/addons/hx_dialect/template/mobile/images/activity.css">
	<style>.form-group.dl_radio dt{float:left}.form-group.dl_radio{overflow:hidden}.form-group.dl_radio dt{width:150px}.btnd1{background-color:#f0ad4e;border-radius:3px;color:#282828;padding:8px}.radio{margin-bottom:25px;display:block}</style>
    <script type="text/javascript">
        //窗口动作
        $(function () {
        //引导关闭
            $(".guide").click(function () {
                setTimeout("$('.guide').hide()", 500);
            });
        });
        $(document).ready(function () {
            check_share(get_uri_arguments());
        });
        function get_uri_arguments() {
            var _get = {},
                args = location.search.substr(1).split(/&/);
            for (var i = 0; i < args.length; ++i) {
                var tmp = args[i].split(/=/);
                if (tmp[0] != "") {
                    _get[decodeURIComponent(tmp[0])] = decodeURIComponent(tmp.slice(1).join("").replace("+", " "));
                }
            }
            return _get;
        }
        function check_share(get_arguments) {
            console.log(get_arguments);
            if (get_arguments.share == 1) {

                $("#is_not_share").hide();
                $("#is_share").show();
            } else {

                $("#is_share").hide();
                $("#is_not_share").show();
            }
        }

    </script>
<script id="08CFDED8BBEDB77D"></script>
</head>
<body>
<style>body{background:url("/addons/hx_dialect/template/mobile/images/back.png")}.bban{background-color:rgba(0,0,0,.8);top:0;height:69px;width:100%;z-index:100;overflow:hidden}.bban.aban{display:block;height:100%;width:100%}.bban.iban{float:left;height:30px;margin:20px 12px;width:30px}.bban.text{color:#FFF;float:left;margin-top:20px}.bban.btnd{background-color:#E2E2E2;border-radius:3px;color:#282828;float:right;margin:20px;padding:8px}.bban.p1{font-size:14px;opacity:.8}.bban.p2{font-size:11px;margin-top:2px;opacity:.6}.bban.x{background:url(/addons/hx_dialect/template/mobile/images/btn_close.png)no-repeat left top;background-size:auto 16px;height:25px;left:0;position:absolute;top:0;width:25px}.tjcj{height:300px;width:100%;position:absolute;top:30%;margin:auto;z-index:1000}.tjcj1{height:100%;background-color:white;width:300px;margin:auto}</style>
<div class="wrap_wap">
    <div class="activity_hd"><img src="{$_W['attachurl']}{$reply['thumb']}"></div>
    <div class="activity_bd">
        <div style="display: none" id="is_not_share">
            <div style="display: none;" class="guide guide_fd">
                <div class="guide_bg"></div>
                <div title="赶快邀请好友分享" class="guide_friend"></div>
            </div>
            <center style="margin-top:15px;text-shadow:1px 1px 1px #000000; font-size:14px; font-weight:bold;">已有
                {$dnum} 人参与测试
            </center>
            <div id="ready" class="boxcontent boxwhite">
                <div class="box">
                    <div class="Detail">
                        <p style="text-indent:2em; line-height:30px; text-align:justify;color: white;font-size: 20px">
                            {$reply['r_title']}</p>
                        <button onclick="$('#start').show();$('#ready').hide();document.getElementById('question_1').getElementsByTagName('audio')[0].play();" style="width:100%; margin-bottom:20px;" class="btn btn-success" type="button" name="">开始测试
                        </button>

                        <button onclick="$('.guide_fd').show();" style="width:100%" class="btn btn-warning" type="button" name="">喊小伙伴来测试
                        </button>
                    </div>
                </div>
            </div>
            <form action="model.php" method="post" name="quesform" id="quesform">
                <div class="boxcontent boxwhite" id="start" style="display:none;">
                {php $i = 0;}
                {loop $questions $vo}
                {php $i ++;}
                    <div class="box" style="display: none;position: relative"  id="question_{$i}">
                        <div class="page" style="width:100%;text-align: center;position: absolute;">当前第&nbsp;<span>{$i}</span>&nbsp;题 共{$reply['num']}题</div>
                        <div class="Detail" >
                            <div class="form_mod">
                                <dl class="form-group">
                                    <dt class="control-label">
                                        <span class="must">*</span>单选题目：
                                        <span id="title">{$vo['title']}</span>
                                    </dt>
                                    <dd id="items">
                                        <input type='hidden' id='ans{$i}' name='ans{$i}' value="">
                                        <div class="radio" id="items{$i}" >
                                            <input onclick="chooseOpt({$i},this,'A')" type="radio" name="question" id="itema{$i}" value="0" class="input_radio">&nbsp;
                                            <label class="label_radio" for="itema{$i}">{$vo['a']}</label>
                                        </div>
                                        <div class="radio" id="items{$i}" >
                                            <input onclick="chooseOpt({$i},this,'B')" type="radio" name="question" id="itemb{$i}" value="0" class="input_radio">&nbsp;
                                            <label class="label_radio" for="itemb{$i}">{$vo['b']}</label>
                                        </div>
                                        <div class="radio" id="items{$i}" >
                                            <input onclick="chooseOpt({$i},this,'C')" type="radio" name="question" id="itemc{$i}" value="0" class="input_radio">&nbsp;
                                            <label class="label_radio" for="itemc{$i}">{$vo['c']}</label>
                                        </div>
                                    </dd>
                                </dl>
                                <span style="display:block;width:100%; margin:0px 5px;">
                                    <audio controls="controls" preload="auto" src="{$_W['attachurl']}{$vo['audio']}" >Your browser does not support the audio element.</audio>
                                </span>
                                {if $i == 1}
                                <input type='hidden' value={$vo['id']}  id='true1'>
                                {else}
                                <button name="" type="button" class="btn btn-default" id="back" onclick="pext({$i})"  style="width:100%; margin:0px 5px;">上一题</button>
                                <input type='hidden' value={$vo['id']}  id='true{$i}'>
                                {/if}
                            </div>
                        </div>
                    </div>
                    {/loop}    
                </div>
            </form>

            <div style="display:none;" id="result" class="boxcontent boxwhite">
                <div class="box">
                    <div class="Detail">
                        <h3 style="font-size:24px; color:#cc0000;">您的{$reply['r_name']}听力测试分数为 <span id="level"></span>分【总分：{$marks}分】</h3>

                        <p><strong>详细分析：</strong></p>

                        <p id="intro" style="text-indent:2em; line-height:20px; text-align:justify;">

                        </p>

                        <dl style="width:100%; overflow:hidden;">
                            <dd style="float:left; width:100%;"><span style="padding:0px 5px; box-sizing:border-box; display:block"></span></dd>
                            <dd style="float:left; width:50%;"><span style="padding:0px 5px; box-sizing:border-box; display:block"><button onclick="$('.guide_fd').show();" style="width:100%;" class="btn btn-danger" type="button" name="">
                                        分享成绩
                                    </button></span></dd>
                            <dd style="float:left; width:50%;"><span style="padding:0px 5px; box-sizing:border-box; display:block"><button onclick="location=''" style="width:100%;" class="btn btn-warning" type="button" name="">
                                        重新测试
                                    </button></span></dd>

                        </dl>

                    </div>
                </div>
            </div>


        </div>


    </div>

    <div style="height:40px;" class="activity_ft">

            <div style="height: 40px;margin:15px 15px 0;line-height: 40px;background-color:rgba(255,255,255,0.3);font-size: 17px;font-family: 'microsoft yahei'" class="version">

                <a style="color: white;display: inline-block;width: 100%;height: 100%" href="{$reply['s_sucai']}"> <span class="company">点击这里，关注{$_W['account']['name']}</span> </a></div>
       </div>

    <div style="text-align:center;height: 20px;margin:7px 15px 0;line-height: 20px;"><span class="company">&copy; {$_W['account']['name']}</span>
    </div>
</div>
<div class="Validform_alert">
    <div id="msgvalid"></div>
</div>
<script type="text/javascript">
    $("#question_1").show();
	var num=0;
    var dataForWeixin = {
        appId: "wxc002d4a1f8ba6117",
        img: "{$_W['attachurl']}{$reply['s_icon']}",
        url: {if $reply['s_share']}"{$reply['s_share']}"{else}"{$_W['siteroot']}index.php?i={$_W['uniacid']}&c=detail&id={$id}&wxref=mp.weixin.qq.com#wechat_redirect{/if}",
        title: "【{$reply['r_name']}听力考试】，你能听懂多少？",
        desc: "{$reply['r_name']}听力考试",
        fakeid: "",
    };
    function chooseOpt(i, obj, opt) {
        //alert(document.getElementById("question_"+i).getElementsByTagName("audio")[0].pause);
        document.getElementById("question_"+i).getElementsByTagName("audio")[0].pause();
        document.getElementById("ans" + i).value = opt;
        if (i == {$num}) {
            ajaxSubmit(i);
        } else {
            setTimeout(function(){next(i)},100);
        }

    }
    function next(i){
        $("#question_" + i).hide();
        $("#question_" + (i + 1)).show();
		document.getElementById("question_"+(i + 1)).getElementsByTagName("audio")[0].play();
    }
    function pext(k) {
        document.getElementById("question_" + k).style.display = "none";
		document.getElementById("question_" + k).getElementsByTagName("audio")[0].pause();
        document.getElementById("question_" + (k - 1)).style.display = "block";
		document.getElementById("question_" + (k - 1)).getElementsByTagName("audio")[0].play();
    }

    function ajaxSubmit(i) {
        var url = "";
		var a=new Array({$answer});
        var m=new Array({$mark});
		for (var x = 1; x <= i; x++) {
			var key = "ans" + x;
            var value = $("#" + key).val();
			if(value == a[x-1]){
				num+=Number(m[x-1]);
			}
		}
		if(num <= {$m4} ){
			text="{$reply['py_5']}!";
		}
		if(num >= {$m4} && num <={$m3} ){
			text="{$reply['py_4']}";
		}
		if(num >= {$m3} && num <={$m2} ){
			text="{$reply['py_3']}";
		}
		if(num >= {$m2} && num <={$m1} ){
			text="{$reply['py_2']}";
		}
		if(num > {$m1} ){
			text="{$reply['py_1']}";
		}
		xxx(num+"|"+text+"关注{$_W['account']['name']}，回复“听力”获取答案");
    }
    function xxx(data) {
        var arr = data.split("|");
        $("#score").val(arr[0]);
        $('#level').html(arr[0]);
        $('#intro').html(arr[1])
        $('#start').hide();
        $('#result').show()
        dataForWeixin = {
            appId: "wxc002d4a1f8ba6117",
            img: "{$_W['attachurl']}{$reply['s_icon']}",
            url: {if $reply['s_share']}"{$reply['s_share']}"{else}"{$_W['siteroot']}index.php?i={$_W['uniacid']}&c=detail&id={$id}&wxref=mp.weixin.qq.com#wechat_redirect{/if}",
            title: '{$s_title}',
            desc: '{$s_des}',
            fakeid: "",
        };
    }
	audiojs.events.ready(function() {audiojs.createAll();});
	
</script>
<script src="/addons/hx_dialect/template/mobile/images/weixin.js" type="text/javascript"></script>
<div style="display:none;">
</div>
</body></html>
